import { HEAD_DATA } from './actionTypes'
import axios from 'axios'
export const getHeaderData = () => (dispatch) => {
    axios({
        method: 'get',
        url: '/json/head.json'
        // method: 'post',
        // url: 'http://localhost:3000/api',
        // data: {
        //     url: 'https://i.waimai.meituan.com/openh5/homepage/kingkong?_=1591842855593&X-FOR-WITH=RyvO2ErZnwshtcoeEY42Hj8bcbydtEWlYCBfOe5Lm0TWB1%2FceDtE%2BHkfsVX4PBngca7MPSrTR%2BZv7wbhjaqKbyOJW8%2FoC5vUEXzELvKCPwM7PCh0f4hIBWL%2FAo86a3ULY7dSnMGMsfOUM51PVTKjcu7j2go1u6QZnGaiRKET4I%2BtSRQv6DT8CWjCwoad486G9NDmGRMqJ7P55TPtYZx4sg%3D%3D',
        //     params: {
        //         initialLat: 0,
        //         initialLng: 0,
        //         actualLat: 0,
        //         actualLng: 0,
        //         geoType: 2,
        //         wm_latitude: '',
        //         wm_longitude: '',
        //         wm_actual_latitude: '',
        //         wm_actual_longitude: '',
        //         openh5_uuid: '60EAC8DA74F121C5FCC78D1688736FC6C32E20F2C4014C362549A48770B120E8',
        //         uuid: '60EAC8DA74F121C5FCC78D1688736FC6C32E20F2C4014C362549A48770B120E8',
        //     }
        // }
    }).then((rsp) => {
        dispatch({
            type: HEAD_DATA,
            obj: rsp.data
        })
    })
}